module.exports = (app) => {
  const { STRING, BIGINT, INTEGER, DOUBLE, TEXT, DATE } = app.Sequelize;
  const Ad = app.model.define('s_ad', {
    adId: { type: BIGINT, primaryKey: true },
    userId: BIGINT,
    title: TEXT,
    aboutMe: TEXT,
    provinceId: INTEGER,
    cityId: INTEGER,
    meSex: INTEGER,
    meCount: INTEGER,
    stayDate: DATE,
    phone: STRING(11),
    meMinAge: INTEGER,
    meMaxAge: INTEGER,
    meProfessionId: INTEGER,
    monthMinRent: INTEGER,
    monthMaxRent: INTEGER,
    leaseMin: INTEGER,
    leaseMax: INTEGER,
    roomType: INTEGER,
    bedroomType: INTEGER,
    assort: STRING(255),
    requirements: STRING(255),
    shared: INTEGER,
    sharedSex: INTEGER,
    sharedMinAge: INTEGER,
    sharedMaxAge: INTEGER,
    sharedProfessionId: INTEGER,
    flag: INTEGER,
  });

  return Ad;
};
